package day2;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class EenumTest {
    public static void main(String[] args) {
        Sex nan=Sex.妖;
        System.out.println(nan);
        System.out.println(nan instanceof Object);
        System.out.println(nan.name());
        System.out.println(nan.ordinal());
        Student st=new Student();
        Scanner in=new Scanner(System.in);
        System.out.println("请输入名字:");
        st.setName(in.next());
        System.out.println("请输入性别：");
        st.setSex(Sex.valueOf(in.next()));
        System.out.println(st);


    }
}
